//路由
const koaRouter = require("@koa/router");

//前缀
const fileRouter = new koaRouter({ prefix: "/file" });

const { verifyAuth } = require("../middleware/auth.middleware");

const { avatarHandler } = require("../middleware/file.middleware");

const { saveAvatarInfo } = require("../controller/file_controller");

// 上传头像
fileRouter.post("/avatar", verifyAuth, avatarHandler, saveAvatarInfo);



module.exports = fileRouter;
